<template>
    <el-dialog title="修改" v-model="visible" width="200px" append-to-body>
        <el-input-number v-model="num" controls-position="right" :min="0" @change="numChange" />
        <template #footer>
            <div class="dialog-footer">
                <el-button type="primary" @click="handleConfirm">确 定</el-button>
                <el-button @click="visible = false">取 消</el-button>
            </div>
        </template>
    </el-dialog>
</template>
<script setup>
const { proxy } = getCurrentInstance();
// const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
const emit = defineEmits(['confirm','update:num'])
const visible = ref(false);
const num = ref(0)
const props = defineProps({
    
});
// 显示弹框
function show() {
    visible.value = true;
}
// 确认
function handleConfirm() {
    emit('confirm', num.value)
    visible.value = false;

}
function numChange(e) {
    num.value = e;
}
defineExpose({
    show
});
</script>